

import java.util.ArrayList;


public class ProperFormalParams extends FormalParams {

	ArrayList<FormalParam> params;

	public ProperFormalParams(FormalParam formalParam) {
		params = new ArrayList<FormalParam>();
		params.add(formalParam);
	}

	public void addParam(FormalParam e) {
		params.add(e);
	}

	public ArrayList<Integer> getParamsList() {
		ArrayList<Integer> res = new ArrayList<Integer>();
		for (FormalParam fp : params)
			res.add(fp.type.type);
		return res;
	}

	public void check() throws SemanticException {
		for (FormalParam param : params)
			param.check();
	}

	public String toString() {
		String ret = "FormalParams\n";
		String s = "";
		for (FormalParam e : params)
			s += e.toString();
		for (String st : s.split("\n"))
			ret += "| " + st + "\n";
		return ret;
	}
}
